import http from '../http.js';


// 获取图形验证码
let getCode = () => {
    return http({
        url: '/verify/captcha'
    })
}

// 获取短信验证码
let getphonecode = (data) => {
    return http({
        url: '/verify/sms',
        params: data
    })
}

// 注册
let registeruse = (data) => {
    return http({
        method: 'POST',
        url: '/user/register',
        data
    })
}

// 重置密码
let czpwd = (data) => {
    return http({
        method: 'PUT',
        url: '/user/reset_pwd',
        data
    })
}





// 登陆
let tologin = (data) => {
    return http({
        method: 'POST',
        url: '/user/login',
        data
    })
}

// 退出
let outlogin = () => {
    return http({
        url: '/api_wx/wxlogout'
    })
}

// 获取用户信息
let getuserinfo = () => {
    return http({
        url: '/user/info'
    })
}




export default {
    getCode,
    getphonecode,
    registeruse,
    czpwd,
    tologin,
    outlogin,
    getuserinfo
}